package cn.lingyangwl.agile.pay.pay.service;

import cn.lingyangwl.agile.pay.model.entity.PayOrder;
import cn.lingyangwl.agile.pay.model.entity.RefundOrder;
import cn.lingyangwl.agile.pay.model.entity.TransferOrder;

/**
 * 商户通知 service
 *
 * @author shenguangyang
 */
public interface PayMchNotifyService {

    /**
     * 商户通知信息， 只有订单是终态，才会发送通知， 如明确成功和明确失败
     */
    void payOrderNotify(PayOrder dbPayOrder);

    /**
     * 商户通知信息，退款成功的发送通知
     */
    void refundOrderNotify(RefundOrder refundOrder);

    /**
     * 商户通知信息，转账订单的通知接口
     */
    void transferOrderNotify(TransferOrder dbTransferOrder);

    /**
     * 创建响应URL
     */
    String createNotifyUrl(PayOrder payOrder, String appSecret) throws Exception;


    /**
     * 创建响应URL
     */
    String createNotifyUrl(RefundOrder refundOrder, String appSecret) throws Exception;

    /**
     * 创建响应URL
     */
    String createNotifyUrl(TransferOrder transferOrder, String appSecret) throws Exception;

    /**
     * 创建响应URL
     */
    String createReturnUrl(PayOrder payOrder, String appSecret) throws Exception;


}
